using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IWCommunity.WebControls
{
    public class AuthenticatedModePanel : Panel, INamingContainer, IParserAccessor
    {
               
        protected override void AddParsedSubObject(object obj)
        {
            if (calculateShouldRender())
            {
                base.AddParsedSubObject(obj);
            }
        }

        private bool calculateShouldRender()
        {
            return HttpContext.Current.Request.IsAuthenticated;
        }
    }
}
